﻿<UserControl x:Class="SQLToolbox.ucComparisonResults"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:types="clr-namespace:SQLToolbox.View.Types;assembly=SQLToolbox.View.Types">
    <UserControl.Resources>
        <ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="actionDataProvider">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="types:ComparisonAction"/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </UserControl.Resources>
    <ListView Name="lv1">

        <ListView.View>
            <GridView>
                <GridViewColumn Header="Type" DisplayMemberBinding="{Binding Path=Type}"/>
                <GridViewColumn Header="Status" DisplayMemberBinding="{Binding Path=Status}"/>
                <GridViewColumn Header="Source" DisplayMemberBinding="{Binding Path=ObjectName}"/>
                <GridViewColumn Header="Action">
                    <GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Name="actionCombo" SelectedValue="{Binding Path=Action}"
                                                      ItemsSource="{Binding Source={StaticResource
                                             actionDataProvider}}" Width="100"/>
                        </DataTemplate>
                    </GridViewColumn.CellTemplate>
                </GridViewColumn>
                <GridViewColumn Header="Target" DisplayMemberBinding="{Binding Path=ObjectName}"/>
            </GridView>
        </ListView.View>
    </ListView>
</UserControl>
